<?php
/*
Template Name: Article/文章
*/

header('Location:http://www.mangse.com/');
?>
<?php get_header(); ?>
	<div id="content" class="content">
		<div id="innerContent">
			<?php
			$limit = get_option('posts_per_page');
			$paged = (get_query_var('paged')) ? get_query_var('paged') : 0;
			query_posts('cat=-1&showposts=' . $limit . '&paged=' . $paged);
			?>
			<?php if (have_posts()) : ?>
				<?php while (have_posts()) : the_post(); ?>
					<div class="textbox">
				<div class="textbox_header"></div>
				<div class="textbox_inner">
					<div class="textbox-title">
		                    <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('阅读 %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h1>
							<h2 class="post_author">
								<div class="photo_left"><?php echo get_avatar( get_the_author_email(), '40' ); ?></div>
								<div class="author_right">
								  <div class="author_right_top">
									<span><?php the_author_posts_link(); ?> [ <span><?php printf(__('%s', 'kubrick'), get_the_category_list(', ')); ?></span> ]
									</span>
								  </div>
								<div class="author_right_bottom">
									<?php the_time(__('F jS, Y', 'kubrick')) ?>
									[<?php comments_popup_link(__('看法', 'kubrick'), __('1个看法', 'kubrick'), __('%个看法', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>]
								</div>
								</div>
							</h2>

								<div class="textbox-content article-content">
									<div><?php the_content('<br /><span class="tip">阅读全文</span>'); ?></div>
									<p class="postmetadata">
									<?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', '<br />'); ?>
									</p>
								</div>

									</div>
								</div>
								<div class="textbox_footer"></div>
							</div>

				<?php endwhile; ?>

			<div class="article-bottom" style="display: block">
				<div class="pages">
						<span class="pagebar-selections">
						<div id="pagenavi">
							<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
						</div>
						</span>
				</div>
			</div>
		<?php else : ?>
		<div class="textbox">
			<div class="textbox_header"></div>
			<div class="textbox_inner">
                <div class="textbox-title">
                    <h1><?php _e('Not Found', 'kubrick'); ?></h1>
                </div>
                <div class="textbox-content article-content">
	                <div>
	                <p class="center"><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'kubrick'); ?></p>
					<?php get_search_form(); ?>
	                </div>
                </div>
			</div>
			<div class="textbox_footer"></div>
		</div>
		<?php endif; ?>
		</div>
	</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>